package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallOrder;
import com.appkubes.mall.core.po.MallOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallOrderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderSqlProvider.class, method="countByExample")
    long countByExample(MallOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallOrderSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_order",
        "where order_key = #{orderKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String orderKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_order (order_key, app_key, ",
        "user_key, order_no, ",
        "delivery_money, amount, ",
        "pay_state, pay_amount, ",
        "addition_money, pay_credits, ",
        "pay_balance, pay_time, ",
        "create_time, confirm_time, ",
        "cancel_time, `status`, ",
        "msg, is_delete, is_show, ",
        "update_time, expire_time, ",
        "deposit_money, pay_type, ",
        "is_implement, order_type, ",
        "is_partially_compelete, mobile, ",
        "`name`, address, address_key, ",
        "goods_num, user_origin, ",
        "send_kd_code, send_orderno, ",
        "back_orderno, is_comment, ",
        "periods, is_collected, ",
        "owing_amount, use_deposit_money, ",
        "flex_type, flex_segment1, ",
        "flex_segment2, flex_segment3, ",
        "version)",
        "values (#{orderKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{userKey,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, ",
        "#{deliveryMoney,jdbcType=DECIMAL}, #{amount,jdbcType=DECIMAL}, ",
        "#{payState,jdbcType=INTEGER}, #{payAmount,jdbcType=DECIMAL}, ",
        "#{additionMoney,jdbcType=DECIMAL}, #{payCredits,jdbcType=DECIMAL}, ",
        "#{payBalance,jdbcType=DECIMAL}, #{payTime,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=INTEGER}, #{confirmTime,jdbcType=INTEGER}, ",
        "#{cancelTime,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, ",
        "#{msg,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{isShow,jdbcType=TINYINT}, ",
        "#{updateTime,jdbcType=INTEGER}, #{expireTime,jdbcType=INTEGER}, ",
        "#{depositMoney,jdbcType=DECIMAL}, #{payType,jdbcType=TINYINT}, ",
        "#{isImplement,jdbcType=TINYINT}, #{orderType,jdbcType=TINYINT}, ",
        "#{isPartiallyCompelete,jdbcType=TINYINT}, #{mobile,jdbcType=VARCHAR}, ",
        "#{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{addressKey,jdbcType=VARCHAR}, ",
        "#{goodsNum,jdbcType=INTEGER}, #{userOrigin,jdbcType=CHAR}, ",
        "#{sendKdCode,jdbcType=CHAR}, #{sendOrderno,jdbcType=CHAR}, ",
        "#{backOrderno,jdbcType=VARCHAR}, #{isComment,jdbcType=TINYINT}, ",
        "#{periods,jdbcType=INTEGER}, #{isCollected,jdbcType=TINYINT}, ",
        "#{owingAmount,jdbcType=DECIMAL}, #{useDepositMoney,jdbcType=DECIMAL}, ",
        "#{flexType,jdbcType=VARCHAR}, #{flexSegment1,jdbcType=VARCHAR}, ",
        "#{flexSegment2,jdbcType=VARCHAR}, #{flexSegment3,jdbcType=VARCHAR}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallOrderSqlProvider.class, method="insertSelective")
    int insertSelective(MallOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="delivery_money", property="deliveryMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_state", property="payState", jdbcType=JdbcType.INTEGER),
        @Result(column="pay_amount", property="payAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="addition_money", property="additionMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_credits", property="payCredits", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_balance", property="payBalance", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_time", property="payTime", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="confirm_time", property="confirmTime", jdbcType=JdbcType.INTEGER),
        @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="msg", property="msg", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.INTEGER),
        @Result(column="is_show", property="isShow", jdbcType=JdbcType.TINYINT),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.INTEGER),
        @Result(column="deposit_money", property="depositMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_type", property="payType", jdbcType=JdbcType.TINYINT),
        @Result(column="is_implement", property="isImplement", jdbcType=JdbcType.TINYINT),
        @Result(column="order_type", property="orderType", jdbcType=JdbcType.TINYINT),
        @Result(column="is_partially_compelete", property="isPartiallyCompelete", jdbcType=JdbcType.TINYINT),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="address_key", property="addressKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_num", property="goodsNum", jdbcType=JdbcType.INTEGER),
        @Result(column="user_origin", property="userOrigin", jdbcType=JdbcType.CHAR),
        @Result(column="send_kd_code", property="sendKdCode", jdbcType=JdbcType.CHAR),
        @Result(column="send_orderno", property="sendOrderno", jdbcType=JdbcType.CHAR),
        @Result(column="back_orderno", property="backOrderno", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_comment", property="isComment", jdbcType=JdbcType.TINYINT),
        @Result(column="periods", property="periods", jdbcType=JdbcType.INTEGER),
        @Result(column="is_collected", property="isCollected", jdbcType=JdbcType.TINYINT),
        @Result(column="owing_amount", property="owingAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="use_deposit_money", property="useDepositMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="flex_type", property="flexType", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment1", property="flexSegment1", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment2", property="flexSegment2", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment3", property="flexSegment3", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallOrder> selectByExampleWithRowbounds(MallOrderExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="delivery_money", property="deliveryMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_state", property="payState", jdbcType=JdbcType.INTEGER),
        @Result(column="pay_amount", property="payAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="addition_money", property="additionMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_credits", property="payCredits", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_balance", property="payBalance", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_time", property="payTime", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="confirm_time", property="confirmTime", jdbcType=JdbcType.INTEGER),
        @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="msg", property="msg", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.INTEGER),
        @Result(column="is_show", property="isShow", jdbcType=JdbcType.TINYINT),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.INTEGER),
        @Result(column="deposit_money", property="depositMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_type", property="payType", jdbcType=JdbcType.TINYINT),
        @Result(column="is_implement", property="isImplement", jdbcType=JdbcType.TINYINT),
        @Result(column="order_type", property="orderType", jdbcType=JdbcType.TINYINT),
        @Result(column="is_partially_compelete", property="isPartiallyCompelete", jdbcType=JdbcType.TINYINT),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="address_key", property="addressKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_num", property="goodsNum", jdbcType=JdbcType.INTEGER),
        @Result(column="user_origin", property="userOrigin", jdbcType=JdbcType.CHAR),
        @Result(column="send_kd_code", property="sendKdCode", jdbcType=JdbcType.CHAR),
        @Result(column="send_orderno", property="sendOrderno", jdbcType=JdbcType.CHAR),
        @Result(column="back_orderno", property="backOrderno", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_comment", property="isComment", jdbcType=JdbcType.TINYINT),
        @Result(column="periods", property="periods", jdbcType=JdbcType.INTEGER),
        @Result(column="is_collected", property="isCollected", jdbcType=JdbcType.TINYINT),
        @Result(column="owing_amount", property="owingAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="use_deposit_money", property="useDepositMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="flex_type", property="flexType", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment1", property="flexSegment1", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment2", property="flexSegment2", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment3", property="flexSegment3", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallOrder> selectByExample(MallOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "order_key, app_key, user_key, order_no, delivery_money, amount, pay_state, pay_amount, ",
        "addition_money, pay_credits, pay_balance, pay_time, create_time, confirm_time, ",
        "cancel_time, `status`, msg, is_delete, is_show, update_time, expire_time, deposit_money, ",
        "pay_type, is_implement, order_type, is_partially_compelete, mobile, `name`, ",
        "address, address_key, goods_num, user_origin, send_kd_code, send_orderno, back_orderno, ",
        "is_comment, periods, is_collected, owing_amount, use_deposit_money, flex_type, ",
        "flex_segment1, flex_segment2, flex_segment3, version",
        "from mall_order",
        "where order_key = #{orderKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="delivery_money", property="deliveryMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_state", property="payState", jdbcType=JdbcType.INTEGER),
        @Result(column="pay_amount", property="payAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="addition_money", property="additionMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_credits", property="payCredits", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_balance", property="payBalance", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_time", property="payTime", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="confirm_time", property="confirmTime", jdbcType=JdbcType.INTEGER),
        @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="msg", property="msg", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.INTEGER),
        @Result(column="is_show", property="isShow", jdbcType=JdbcType.TINYINT),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.INTEGER),
        @Result(column="deposit_money", property="depositMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="pay_type", property="payType", jdbcType=JdbcType.TINYINT),
        @Result(column="is_implement", property="isImplement", jdbcType=JdbcType.TINYINT),
        @Result(column="order_type", property="orderType", jdbcType=JdbcType.TINYINT),
        @Result(column="is_partially_compelete", property="isPartiallyCompelete", jdbcType=JdbcType.TINYINT),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="address_key", property="addressKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_num", property="goodsNum", jdbcType=JdbcType.INTEGER),
        @Result(column="user_origin", property="userOrigin", jdbcType=JdbcType.CHAR),
        @Result(column="send_kd_code", property="sendKdCode", jdbcType=JdbcType.CHAR),
        @Result(column="send_orderno", property="sendOrderno", jdbcType=JdbcType.CHAR),
        @Result(column="back_orderno", property="backOrderno", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_comment", property="isComment", jdbcType=JdbcType.TINYINT),
        @Result(column="periods", property="periods", jdbcType=JdbcType.INTEGER),
        @Result(column="is_collected", property="isCollected", jdbcType=JdbcType.TINYINT),
        @Result(column="owing_amount", property="owingAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="use_deposit_money", property="useDepositMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="flex_type", property="flexType", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment1", property="flexSegment1", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment2", property="flexSegment2", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment3", property="flexSegment3", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallOrder selectByPrimaryKey(String orderKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallOrder record, @Param("example") MallOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallOrder record, @Param("example") MallOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order
     *
     * @mbg.generated
     */
    @Update({
        "update mall_order",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "order_no = #{orderNo,jdbcType=VARCHAR},",
          "delivery_money = #{deliveryMoney,jdbcType=DECIMAL},",
          "amount = #{amount,jdbcType=DECIMAL},",
          "pay_state = #{payState,jdbcType=INTEGER},",
          "pay_amount = #{payAmount,jdbcType=DECIMAL},",
          "addition_money = #{additionMoney,jdbcType=DECIMAL},",
          "pay_credits = #{payCredits,jdbcType=DECIMAL},",
          "pay_balance = #{payBalance,jdbcType=DECIMAL},",
          "pay_time = #{payTime,jdbcType=INTEGER},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "confirm_time = #{confirmTime,jdbcType=INTEGER},",
          "cancel_time = #{cancelTime,jdbcType=INTEGER},",
          "`status` = #{status,jdbcType=VARCHAR},",
          "msg = #{msg,jdbcType=VARCHAR},",
          "is_delete = #{isDelete,jdbcType=INTEGER},",
          "is_show = #{isShow,jdbcType=TINYINT},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "expire_time = #{expireTime,jdbcType=INTEGER},",
          "deposit_money = #{depositMoney,jdbcType=DECIMAL},",
          "pay_type = #{payType,jdbcType=TINYINT},",
          "is_implement = #{isImplement,jdbcType=TINYINT},",
          "order_type = #{orderType,jdbcType=TINYINT},",
          "is_partially_compelete = #{isPartiallyCompelete,jdbcType=TINYINT},",
          "mobile = #{mobile,jdbcType=VARCHAR},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "address_key = #{addressKey,jdbcType=VARCHAR},",
          "goods_num = #{goodsNum,jdbcType=INTEGER},",
          "user_origin = #{userOrigin,jdbcType=CHAR},",
          "send_kd_code = #{sendKdCode,jdbcType=CHAR},",
          "send_orderno = #{sendOrderno,jdbcType=CHAR},",
          "back_orderno = #{backOrderno,jdbcType=VARCHAR},",
          "is_comment = #{isComment,jdbcType=TINYINT},",
          "periods = #{periods,jdbcType=INTEGER},",
          "is_collected = #{isCollected,jdbcType=TINYINT},",
          "owing_amount = #{owingAmount,jdbcType=DECIMAL},",
          "use_deposit_money = #{useDepositMoney,jdbcType=DECIMAL},",
          "flex_type = #{flexType,jdbcType=VARCHAR},",
          "flex_segment1 = #{flexSegment1,jdbcType=VARCHAR},",
          "flex_segment2 = #{flexSegment2,jdbcType=VARCHAR},",
          "flex_segment3 = #{flexSegment3,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where order_key = #{orderKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallOrder record);
}